﻿using System;
using System.Collections.Generic;
using System.Threading;
using System.Windows.Threading;

namespace Galaktika.BI.Runtime.Services
{
    public interface IUserTaskManager
    {
        Dispatcher Dispatcher { get; }
        UserTaskDescriptor CreateTask(string caption);
        void DoneTask(UserTaskDescriptor wi);
        void AbortTask(UserTaskDescriptor wi, string finishMessage);
        void AbortTask(UserTaskDescriptor wi, Exception exc);
        void RunTaskChainAsync(IEnumerable<UserTaskItem> taskChain);
        void RunTaskAsync(string caption, WaitCallback callback);
        void RunTaskAsync(string caption, WaitCallback callback, object state);
        void RunTask(string caption, WaitCallback callback);
        void RunTask(string caption, WaitCallback callback, object state);
    }
}
